package com.sky.business.sys.param;

import com.sky.business.sys.domain.MQTTMessage;
import com.sky.common.annotation.DateTimeStr;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
public class MQTTMessageQueryListParam extends PageParam{

    private String content;

    private MQTTMessage.Type type;

    @Schema(description = "事件名称", defaultValue = "BeginTracking")
    private String event;

    @Schema(description = "设备ID", defaultValue = "14218400000101571634536743000209")
    private String deviceId;

    @Schema(description = "任务ID", defaultValue = "task/5ga")
    private String taskId;

    @Schema(description = "节点ID", defaultValue = "1")
    private Integer nodeId;


    @DateTimeStr(message = "时间格式不正确，请使用yyyy-MM-dd HH:mm:ss格式")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @DateTimeStr(message = "时间格式不正确，请使用yyyy-MM-dd HH:mm:ss格式")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

}
